using System;
using System.Data;
using SubSonic;

namespace Medianamik.UI.Web.Shop.Data
{
    public partial class SPs
    {
        /// <summary>
        /// Creates an object wrapper for the GetGroupedProduct Procedure
        /// </summary>
        public static StoredProcedure GetGroupedProduct(int? PageSize, int? PageIndex, bool? IsActive, Guid? ParentNodeId, Guid? TypeId, Guid? Brand, Guid? Categories, string Name, string CultureList, int? Generation)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetGroupedProduct", DataService.GetInstance("CodeGenerationProvider"));

            sp.Command.AddParameter("@PageSize", PageSize, DbType.Int32);

            sp.Command.AddParameter("@PageIndex", PageIndex, DbType.Int32);

            sp.Command.AddParameter("@IsActive", IsActive, DbType.Boolean);

            sp.Command.AddParameter("@ParentNodeId", ParentNodeId, DbType.Guid);

            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid);

            sp.Command.AddParameter("@Brand", Brand, DbType.Guid);

            sp.Command.AddParameter("@Categories", Categories, DbType.Guid);

            sp.Command.AddParameter("@Name", Name, DbType.String);

            sp.Command.AddParameter("@CultureList", CultureList, DbType.String);

            sp.Command.AddParameter("@Generation", Generation, DbType.Int32);

            return sp;
        }

        /// <summary>
        /// Creates an object wrapper for the GetGroupedProductCount Procedure
        /// </summary>
        public static StoredProcedure GetGroupedProductCount(bool? IsActive, Guid? ParentNodeId, Guid? TypeId, Guid? Brand, Guid? Categories, string Name, int? Generation, string CultureList)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("GetGroupedProductCount", DataService.GetInstance("CodeGenerationProvider"));

            sp.Command.AddParameter("@IsActive", IsActive, DbType.Boolean);

            sp.Command.AddParameter("@ParentNodeId", ParentNodeId, DbType.Guid);

            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid);

            sp.Command.AddParameter("@Brand", Brand, DbType.Guid);

            sp.Command.AddParameter("@Categories", Categories, DbType.Guid);

            sp.Command.AddParameter("@Name", Name, DbType.String);

            sp.Command.AddParameter("@Generation", Generation, DbType.Int32);

            sp.Command.AddParameter("@CultureList", CultureList, DbType.String);

            return sp;
        }

    }  
}

